package com.liliya.service.impl;

import com.liliya.dao.AdDao;
import com.liliya.dao.impl.AdDaoImpl;
import com.liliya.pojo.Ad;
import com.liliya.service.AdService;

import java.util.List;

/**
 * @Description TODO
 * @Author hhy
 * @Date 2021/1/6 20:42
 */
public class AdServiceImpl implements AdService {
    private AdDao adDao = new AdDaoImpl();
    @Override
    public void addAd(Ad ad) {
        adDao.addAd(ad);
    }

    @Override
    public Ad findAdByAdNum(Integer adnum) {
        return adDao.findAdByAdNum(adnum);
    }

    @Override
    public List<Ad> findAds(Integer start, Integer end) {
        return adDao.findAds(start,end);
    }

    @Override
    public Ad findAd(Integer row) {
        return adDao.findAd(row);
    }

    @Override
    public Integer adTotal() {
        return adDao.adTotal();
    }

    @Override
    public void deleteAd(Integer adnum) {
        adDao.deleteAd(adnum);
    }

    @Override
    public void updateAd(Ad ad) {
        adDao.updateAd(ad);
    }
}
